package com.vader.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author kaivader
 */
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT",fallback = PaymentHystrixServiceFallbackImpl.class)
@Component
public interface PaymentHystrixService {

    @GetMapping("hystrix/ok/{id}")
    public String ok(@PathVariable("id") Integer id);

    @GetMapping("hystrix/timeout/{id}")
    public String timeOut(@PathVariable("id") Integer id);
}
